home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / RAVESystem.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  11.8 KB  |  285 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        RAVESystem.a
  3. ;
  4. ;    Contains:    Interfaces needed when building RAVE engines                            
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.4
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__RAVESYSTEM__') = 'UNDEFINED' THEN
  18. __RAVESYSTEM__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.     IF &TYPE('__RAVE__') = 'UNDEFINED' THEN
  24.     include 'RAVE.a'
  25.     ENDIF
  26.  
  27.  
  28.  
  29. ; ************************************************************************************************
  30. ; *
  31. ; * Typedefs of texture/bitmap method functions provided by the drawing engine.
  32. ; *
  33. ; **********************************************************************************************
  34.  
  35. ;  TQAColorTableNew    parameter descriptions 
  36. ;  TQAColorTableType    pixelType            Depth, color space, etc. 
  37. ;  void                    *pixelData            lookup table entries in pixelType format 
  38. ;  long                    transparentIndex    boolean, false means no transparency, true means index 0 is transparent 
  39. ;  TQAColorTable        **newTable            (Out) Newly created TQAColorTable 
  40. ;  TQAColorTableDelete    parameter descriptions 
  41. ;  TQAColorTable        *colorTable        Previously allocated by QAColorTableNew() 
  42. ;  TQATextureNew    parameter descriptions 
  43. ;     unsigned long        flags                Mask of kQATexture_xxx flags 
  44. ;     TQAImagePixelType    pixelType            Depth, color space, etc. 
  45. ;     const TQAImage        images[]            Image(s) for texture 
  46. ;     TQATexture            **newTexture        (Out) Newly created TQATexture, or NULL on error 
  47. ;  TQATextureDetach    parameter descriptions 
  48. ;     TQATexture            *texture            Previously allocated by QATextureNew() 
  49. ;  TQATextureDelete    parameter descriptions 
  50. ;     TQATexture            *texture            Previously allocated by QATextureNew() 
  51. ;  TQATextureBindColorTable    parameter descriptions 
  52. ;     TQATexture            *texture            Previously allocated by QATextureNew() 
  53. ;     TQAColorTable        *colorTable            Previously allocated by QAColorTableNew() 
  54. ;  TQABitmapNew    parameter descriptions 
  55. ;     unsigned long        flags                Mask of kQABitmap_xxx flags 
  56. ;     TQAImagePixelType    pixelType            Depth, color space, etc. 
  57. ;     const TQAImage        *image                Image 
  58. ;     TQABitmap            **newBitmap            (Out) Newly created TQABitmap, or NULL on error 
  59. ;  TQABitmapDetach    parameter descriptions 
  60. ;     TQABitmap            *bitmap            Previously allocated by QABitmapNew() 
  61. ;  TQABitmapDelete    parameter descriptions 
  62. ;     TQABitmap            *bitmap            Previously allocated by QABitmapNew() 
  63. ;  TQABitmapBindColorTable    parameter descriptions 
  64. ;     TQABitmap            *bitmap            Previously allocated by QABitmapNew() 
  65. ;     TQAColorTable        *colorTable        Previously allocated by QAColorTableNew() 
  66. ; ************************************************************************************************
  67. ; *
  68. ; * Typedefs of private (system-only) functions provided by the drawing engine.
  69. ; *
  70. ; * The TQADrawPrivateNew function returns a TQADrawPrivate *, which points to the
  71. ; * engine-specific private data created for the context. (TQADrawPrivate is a dummy
  72. ; * type which is then cast to the correct engine-specific datatype by the engine code.)
  73. ; *
  74. ; * The TQADrawPrivateDelete function deletes the engine-specific private data.
  75. ; *
  76. ; * TQAStorePrivateNew and TQAStorePrivateDelete provide the same function as QADrawPrivateNew
  77. ; * and TQADrawPrivateDelete, but for the texture and bitmap storage context.
  78. ; *
  79. ; * TQADrawMethodGet and TQAStoreMethodGet are called by the RAVE manager to retrieve
  80. ; * the method pointers for a drawing engine.
  81. ; *
  82. ; * The TQAEngineCheckDevice function returns TRUE if the engine can render to the
  83. ; * indicated GDevice.
  84. ; *
  85. ; **********************************************************************************************
  86.  
  87. ;  TQADrawPrivateNew    parameter descriptions 
  88. ;     TQADrawContext        *newDrawContext        Draw context to initialize 
  89. ;     const TQADevice        *device                Target device 
  90. ;     const TQARect        *rect                Target rectangle (device coordinates) 
  91. ;     const TQAClip        *clip                2D clip region (or NULL) 
  92. ;     unsigned long        flags                Mask of kQAContext_xxx 
  93. ;  TQADrawPrivateDelete    parameter descriptions 
  94. ;     TQADrawPrivate        *drawPrivate        Private context data to delete 
  95. ;  TQAEngineCheckDevice    parameter descriptions 
  96. ;     const TQADevice        *device            Target device 
  97. ;  TQAEngineGestalt    parameter descriptions 
  98. ;     TQAGestaltSelector    selector            Gestalt parameter being requested 
  99. ;     void                *response            Buffer that receives response 
  100. ; ************************************************************************************************
  101. ; *
  102. ; * The TQAEngineMethod union is used to represent a single engine method (it's a
  103. ; * parameter to QAEngineGetMethod). TQAEngineMethodTag identifies which method is being
  104. ; * requested.
  105. ; *
  106. ; **********************************************************************************************
  107.  
  108. TQAEngineMethod            RECORD 0
  109. drawPrivateNew             ds.l    1                ; offset: $0 (0)        ;  Method: Create a private draw context 
  110.                          ORG 0
  111. drawPrivateDelete         ds.l    1                ; offset: $0 (0)        ;  Method: Delete a private draw context 
  112.                          ORG 0
  113. engineCheckDevice         ds.l    1                ; offset: $0 (0)        ;  Method: Check a device for drawing 
  114.                          ORG 0
  115. engineGestalt             ds.l    1                ; offset: $0 (0)        ;  Method: Gestalt 
  116.                          ORG 0
  117. textureNew                 ds.l    1                ; offset: $0 (0)        ;  Method: Create a texture (load is non-blocking) 
  118.                          ORG 0
  119. textureDetach             ds.l    1                ; offset: $0 (0)        ;  Method: Complete load of a texture (blocking) 
  120.                          ORG 0
  121. textureDelete             ds.l    1                ; offset: $0 (0)        ;  Method: Delete a texture 
  122.                          ORG 0
  123. bitmapNew                 ds.l    1                ; offset: $0 (0)        ;  Method: Create a bitmap (load is non-blocking)  
  124.                          ORG 0
  125. bitmapDetach             ds.l    1                ; offset: $0 (0)        ;  Method: Complete load of a bitmap (blocking) 
  126.                          ORG 0
  127. bitmapDelete             ds.l    1                ; offset: $0 (0)        ;  Method: Delete a bitmap 
  128.                          ORG 0
  129. colorTableNew             ds.l    1                ; offset: $0 (0)        ;  Method: Create a new color table 
  130.                          ORG 0
  131. colorTableDelete         ds.l    1                ; offset: $0 (0)        ;  Method: Create a new color table 
  132.                          ORG 0
  133. textureBindColorTable     ds.l    1                ; offset: $0 (0)        ;  Method: Bind a CLUT to a texture 
  134.                          ORG 0
  135. bitmapBindColorTable     ds.l    1                ; offset: $0 (0)        ;  Method: Bind a CLUT to a bitmap 
  136. sizeof                     EQU *                    ; size:   $4 (4)
  137.                         ENDR
  138.  
  139. ; typedef long                            TQAEngineMethodTag
  140. kQADrawPrivateNew                EQU        0
  141. kQADrawPrivateDelete            EQU        1
  142. kQAEngineCheckDevice            EQU        2
  143. kQAEngineGestalt                EQU        3
  144. kQATextureNew                    EQU        4
  145. kQATextureDetach                EQU        5
  146. kQATextureDelete                EQU        6
  147. kQABitmapNew                    EQU        7
  148. kQABitmapDetach                    EQU        8
  149. kQABitmapDelete                    EQU        9
  150. kQAColorTableNew                EQU        10
  151. kQAColorTableDelete                EQU        11
  152. kQATextureBindColorTable        EQU        12
  153. kQABitmapBindColorTable            EQU        13
  154. ; ************************************************************************************************
  155. ; *
  156. ; * QARegisterEngine() registers a new engine. This is called at boot time by the drawing engine
  157. ; * initialization code to register itself with the system. This call takes only one parameter,
  158. ; * the engine's function that allows the manager to request the other methods.
  159. ; *
  160. ; **********************************************************************************************
  161.  
  162. ;  TQAEngineGetMethod    parameter descriptions 
  163. ;     TQAEngineMethodTag        methodTag                Method being requested 
  164. ;     TQAEngineMethod            *method                    (Out) Method 
  165. ;  QARegisterEngine    parameter descriptions 
  166. ;     TQAEngineGetMethod        engineGetMethod        Engine's getMethod method 
  167. ;
  168. ; extern TQAError QARegisterEngine(TQAEngineGetMethod engineGetMethod)
  169. ;
  170.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  171.         IMPORT_CFM_FUNCTION QARegisterEngine
  172.     ENDIF
  173.  
  174. ; ************************************************************************************************
  175. ; *
  176. ; * The TQADrawMethod union is used to represent a single draw context method (it's a
  177. ; * parameter to QARegisterDrawMethod). TQADrawMethodTag identifies which method is being
  178. ; * passed.
  179. ; *
  180. ; **********************************************************************************************
  181.  
  182. TQADrawMethod            RECORD 0
  183. setFloat                 ds.l    1                ; offset: $0 (0)        ;  Method: Set a float state variable 
  184.                          ORG 0
  185. setInt                     ds.l    1                ; offset: $0 (0)        ;  Method: Set an unsigned long state variable 
  186.                          ORG 0
  187. setPtr                     ds.l    1                ; offset: $0 (0)        ;  Method: Set an unsigned long state variable 
  188.                          ORG 0
  189. getFloat                 ds.l    1                ; offset: $0 (0)        ;  Method: Get a float state variable 
  190.                          ORG 0
  191. getInt                     ds.l    1                ; offset: $0 (0)        ;  Method: Get an unsigned long state variable 
  192.                          ORG 0
  193. getPtr                     ds.l    1                ; offset: $0 (0)        ;  Method: Get an pointer state variable 
  194.                          ORG 0
  195. drawPoint                 ds.l    1                ; offset: $0 (0)        ;  Method: Draw a point 
  196.                          ORG 0
  197. drawLine                 ds.l    1                ; offset: $0 (0)        ;  Method: Draw a line 
  198.                          ORG 0
  199. drawTriGouraud             ds.l    1                ; offset: $0 (0)        ;  Method: Draw a Gouraud shaded triangle 
  200.                          ORG 0
  201. drawTriTexture             ds.l    1                ; offset: $0 (0)        ;  Method: Draw a texture mapped triangle 
  202.                          ORG 0
  203. drawVGouraud             ds.l    1                ; offset: $0 (0)        ;  Method: Draw Gouraud vertices 
  204.                          ORG 0
  205. drawVTexture             ds.l    1                ; offset: $0 (0)        ;  Method: Draw texture vertices 
  206.                          ORG 0
  207. drawBitmap                 ds.l    1                ; offset: $0 (0)        ;  Method: Draw a bitmap 
  208.                          ORG 0
  209. renderStart                 ds.l    1                ; offset: $0 (0)        ;  Method: Initialize for rendering 
  210.                          ORG 0
  211. renderEnd                 ds.l    1                ; offset: $0 (0)        ;  Method: Complete rendering and display 
  212.                          ORG 0
  213. renderAbort                 ds.l    1                ; offset: $0 (0)        ;  Method: Abort any outstanding rendering (blocking) 
  214.                          ORG 0
  215. flush                     ds.l    1                ; offset: $0 (0)        ;  Method: Start render of any queued commands (non-blocking) 
  216.                          ORG 0
  217. sync                     ds.l    1                ; offset: $0 (0)        ;  Method: Wait for completion of all rendering (blocking) 
  218.                          ORG 0
  219. submitVerticesGouraud     ds.l    1                ; offset: $0 (0)        ;  Method: Submit Gouraud vertices for trimesh 
  220.                          ORG 0
  221. submitVerticesTexture     ds.l    1                ; offset: $0 (0)        ;  Method: Submit Texture vertices for trimesh 
  222.                          ORG 0
  223. drawTriMeshGouraud         ds.l    1                ; offset: $0 (0)        ;  Method: Draw a Gouraud triangle mesh 
  224.                          ORG 0
  225. drawTriMeshTexture         ds.l    1                ; offset: $0 (0)        ;  Method: Draw a Texture triangle mesh 
  226.                          ORG 0
  227. setNoticeMethod             ds.l    1                ; offset: $0 (0)        ;  Method: Set a notice method 
  228.                          ORG 0
  229. getNoticeMethod             ds.l    1                ; offset: $0 (0)        ;  Method: Get a notice method 
  230. sizeof                     EQU *                    ; size:   $4 (4)
  231.                         ENDR
  232.  
  233. ; typedef long                            TQADrawMethodTag
  234. kQASetFloat                        EQU        0
  235. kQASetInt                        EQU        1
  236. kQASetPtr                        EQU        2
  237. kQAGetFloat                        EQU        3
  238. kQAGetInt                        EQU        4
  239. kQAGetPtr                        EQU        5
  240. kQADrawPoint                    EQU        6
  241. kQADrawLine                        EQU        7
  242. kQADrawTriGouraud                EQU        8
  243. kQADrawTriTexture                EQU        9
  244. kQADrawVGouraud                    EQU        10
  245. kQADrawVTexture                    EQU        11
  246. kQADrawBitmap                    EQU        12
  247. kQARenderStart                    EQU        13
  248. kQARenderEnd                    EQU        14
  249. kQARenderAbort                    EQU        15
  250. kQAFlush                        EQU        16
  251. kQASync                            EQU        17
  252. kQASubmitVerticesGouraud        EQU        18
  253. kQASubmitVerticesTexture        EQU        19
  254. kQADrawTriMeshGouraud            EQU        20
  255. kQADrawTriMeshTexture            EQU        21
  256. kQASetNoticeMethod                EQU        22
  257. kQAGetNoticeMethod                EQU        23
  258. ; ************************************************************************************************
  259. ; *
  260. ; * System call to register a new method for an engine. This is called during the engine's
  261. ; * draw private new functions (to set the initial value of the draw methods), and possibly
  262. ; * at other times when the engine needs to change a draw method.
  263. ; *
  264. ; **********************************************************************************************
  265.  
  266. ;  QARegisterDrawMethod    parameter descriptions 
  267. ;     TQADrawContext            *drawContext            Draw context in which to set method 
  268. ;     TQADrawMethodTag        methodTag                Method to set 
  269. ;     TQADrawMethod            method                    Method 
  270. ;
  271. ; extern TQAError QARegisterDrawMethod(TQADrawContext *drawContext, TQADrawMethodTag methodTag, TQADrawMethod method)
  272. ;
  273.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  274.         IMPORT_CFM_FUNCTION QARegisterDrawMethod
  275.     ENDIF
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.     ENDIF ; __RAVESYSTEM__ 
  284.  
  285.